package com.ruoyi.project.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.system.domain.SiyuProduct;
import com.ruoyi.project.system.mapper.SiyuProductMapper;
import com.ruoyi.project.system.service.ISiyuProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 查询产品Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-28
 */
@Service
public class SiyuProductServiceImpl implements ISiyuProductService
{
    @Autowired
    private SiyuProductMapper siyuProductMapper;

    /**
     * 查询查询产品列表
     *
     * @param siyuProduct 查询产品
     * @return 查询产品
     */
    @Override
    public List<SiyuProduct> selectSiyuProductList(SiyuProduct siyuProduct)
    {
        return siyuProductMapper.selectSiyuProductList(siyuProduct);
    }

    /**
     * 查询查询产品
     * 
     * @param id 查询产品主键
     * @return 查询产品
     */
    @Override
    public SiyuProduct selectSiyuProductById(Integer id)
    {
        return siyuProductMapper.selectSiyuProductById(id);
    }


    /**
     * 修改查询产品
     * 
     * @param siyuProduct 查询产品
     * @return 结果
     */
    @Override
    public int updateSiyuProduct(SiyuProduct siyuProduct)
    {
        siyuProduct.setUpdateTime(DateUtils.getNowDate());
        return siyuProductMapper.updateSiyuProduct(siyuProduct);
    }

}
